]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
authPrompt: Notify error messages in GDM login/unlock
authorSergio Costas Rodriguez <sergio.costas@canonical.com>
Tue, 24 Jun 2025 12:31:40 +0000 (14:31 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Sat, 28 Jun 2025 10:29:16 +0000 (12:29 +0200)
When there is an error during GDM login or unlock (for example,
typing a wrong password), a text message is shown, but nothing
is said by the screen reader.

This patch fixes this, by notifying any error set in the auth
prompt.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3765>
(cherry picked from commit 9121b7ca13455b23094b866b65d8793bd3824793)

js/gdm/authPrompt.js

index aa2d6f1bdd5d501779bda4167b050610c21c4631..32a36c9607fe1a90d59307475a9f3990fe0146ba 100644 (file)
@@ -1,5 +1,6 @@
 import Clutter from 'gi://Clutter';
 import GLib from 'gi://GLib';
+import Atk from 'gi://Atk';
 import GObject from 'gi://GObject';
 import Pango from 'gi://Pango';
 import Shell from 'gi://Shell';
@@ -571,6 +572,7 @@ export const AuthPrompt = GObject.registerClass({
             this._message.remove_all_transitions();
             this._message.text = message;
             this._message.opacity = 255;
+            this.get_accessible().emit('notification', message, Atk.Live.ASSERTIVE);
         } else {
             this._message.opacity = 0;
         }